package cn.iocoder.yudao.module.member.dal.mysql.majorobtain;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.majorobtain.MajorObtainDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.majorobtain.vo.*;

/**
 * 专业表-就业方向 Mapper
 *
 * @author Alan
 */
@Mapper
public interface MajorObtainMapper extends BaseMapperX<MajorObtainDO> {

    default PageResult<MajorObtainDO> selectPage(MajorObtainPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MajorObtainDO>()
                .eqIfPresent(MajorObtainDO::getMajorId, reqVO.getMajorId())
                .likeIfPresent(MajorObtainDO::getObtainName, reqVO.getObtainName())
                .eqIfPresent(MajorObtainDO::getObtainNum, reqVO.getObtainNum())
                .betweenIfPresent(MajorObtainDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MajorObtainDO::getId));
    }

}